function reactionsWeight = calculate_reactions_weight( ...
    reactionsCountInPathway, existingReactionsCount, ...
    unbalancedReactionsCount, thermodinamicllyCorrectReactionsCount)

analysisParameters = evalin('base','analysisParameters');

    existingReactionsWeight = calculate_integral_weight(existingReactionsCount, 0, ...
        reactionsCountInPathway, str2num(analysisParameters.existingReactionsWeight), false);
    unbalancedReactionsWeight = calculate_integral_weight(unbalancedReactionsCount,0, ...
        reactionsCountInPathway,  str2num(analysisParameters.unbalancedReactionsWeight), true);
    thermodinamicallyCorrectReactionsWeight = calculate_integral_weight(...
        thermodinamicllyCorrectReactionsCount,0, reactionsCountInPathway, ...
        str2num(analysisParameters.thermodinamicallyCorrectReactionsWeight), false);
    
    
    
    reactionsWeight = ...
        existingReactionsWeight +...
       unbalancedReactionsWeight + ...
       thermodinamicallyCorrectReactionsWeight;
end















